/*
Copyright SecureKey Technologies Inc. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/
package data

import "git.cloud.inspur.com/ichain/ichain-sdk-go/pkg/client/chain"

const (
	pvk137sw = `
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg6poANAa/dJgcyQNK
FuIJsGed3UEWBuDrSj9nwHWJyK6hRANCAAQZ5viUIzxgQgYqU/zPYCiXTR+iRi47
+PYwcQ3jkfHdZ6H7+7j+NdSa6eP64ZKz2th6QypNTijEC7Bp/T70zAYj
-----END PRIVATE KEY-----
`

	cert137sw = `
-----BEGIN CERTIFICATE-----
MIICRTCCAeygAwIBAgIRAJxTRXmdFgByCGwm+ogxJIQwCgYIKoZIzj0EAwIwgYMx
CzAJBgNVBAYTAkNOMREwDwYDVQQIEwhTaGFuZG9uZzEOMAwGA1UEBxMFSmluYW4x
CTAHBgNVBAkTADEJMAcGA1UEERMAMQ4wDAYDVQQKEwVPcmcwMTEPMA0GA1UECxMG
aWNoYWluMRowGAYDVQQDExFjYS5vMS5kc3AuaWJwLmNvbTAeFw0yMzExMTUwNzA2
MDBaFw0zMzExMTIwNzA2MDBaMHYxCzAJBgNVBAYTAkNOMREwDwYDVQQIEwhTaGFu
ZG9uZzEOMAwGA1UEBxMFSmluYW4xCTAHBgNVBAkTADEJMAcGA1UEERMAMQ8wDQYD
VQQLEwZpY2hhaW4xHTAbBgNVBAMMFHVzZXIxQG8xLmRzcC5pYnAuY29tMFkwEwYH
KoZIzj0CAQYIKoZIzj0DAQcDQgAEGeb4lCM8YEIGKlP8z2Aol00fokYuO/j2MHEN
45Hx3Weh+/u4/jXUmunj+uGSs9rYekMqTU4oxAuwaf0+9MwGI6NNMEswDgYDVR0P
AQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgvrOgzqbTiu7y4kGh
n+/3qm3gbJafMKGqkForcrGjpeAwCgYIKoZIzj0EAwIDRwAwRA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mNbLu
oghbhZgCIDHV7GKigOfxvu0CBRuHlJHkj2ScT2XiH2weP+bM3pwC
-----END CERTIFICATE-----
`

	consenserTls = `
-----BEGIN CERTIFICATE-----
MIICgjCCAimgAwIBAgIQSrabs2i7ZQJZZQHYAQC2YjAKBggqhkjOPQQDAjCBhzEL
MAkGA1UEBhMCQ04xETAPBgNVBAgTCFNoYW5kb25nMQ4wDAYDVQQHEwVKaW5hbjEJ
MAcGA1UECRMAMQkwBwYDVQQREwAxEjAQBgNVBAoTCUNvbnNlbnNlcjEPMA0GA1UE
CxMGaWNoYWluMRowGAYDVQQDExF0bHNjYS5kc3AuaWJwLmNvbTAeFw0yMzExMTUw
NzA2MDBaFw0zMzExMTIwNzA2MDBaMHAxCzAJBgNVBAYTAkNOMREwDwYDVQQIEwhT
aGFuZG9uZzEOMAwGA1UEBxMFSmluYW4xCTAHBgNVBAkTADEJMAcGA1UEERMAMQ8w
DQYDVQQLEwZpY2hhaW4xFzAVBgNVBAMTDmMxLmRzcC5pYnAuY29tMFkwEwYHKoZI
zj0CAQYIKoZIzj0DAQcDQgAEC6B5PkqqlFVOyLXzX516rQhG2vQf6RCUp9Z2fFxP
X1FwOehKnMm53OMyO6q6HJNJ/gjdBTOFYTUurGnefQ9NXaOBjDCBiTAOBgNVHQ8B
Af8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB
/wQCMAAwKwYDVR0jBCQwIoAgkzU5zS9D1qY4cQGCNIqwo/sypIH+fqUVY7g8uetk
P08wHQYDVR0RBBYwFIIOYzEuZHNwLmlicC5jb22CAmMxMAoGCCqGSM49BAMCA0cA
MEQCIGM5xWHsdCvxxhNq5Csl2FqhViZcVZLLKra8u4+2qpVyAiAFuGwdKKx5zJPk
EVyrreqnmqhYEwMwBXVNISy5ed8Cbw==
-----END CERTIFICATE-----
`
)

func Baas137Sw() *BaasEnv {
	return &BaasEnv{
		orgName:        "o1",
		iamId:          "o1",
		chainId:        "oracle-chain",
		cert:           cert137sw,
		pvk:            pvk137sw,
		adminCert:      cert137AdminSw,
		adminPvk:       key137AdminSw,
		loglevel:       "info",
		inodeList:      []string{"inode0.o1.dsp.ibp.com"},
		inodeUrls:      []string{"grpcs://10.110.8.137:7151"},
		inodeCerts:     []string{inodeTls},
		consenserList:  []string{"c1.dsp.ibp.com"},
		consenserUrls:  []string{"grpcs://10.110.8.137:9620"},
		consenserCerts: []string{consenserTls},
		ccInvoke: []chain.Request{
			{
				ContractID: "user",
				Fcn:        "version",
				Args:       [][]byte{[]byte("key1")},
			},
		},
		cryptoType: "SW",

		tlsCert: tlsCert,
		tlsKey:  tlsKey,
	}
}
